package com.webc.framework.start;


import com.webc.framework.bean.AopContainer;
import com.webc.framework.bean.BeanContainer;
import com.webc.framework.bean.IocManager;
import com.webc.framework.bean.MappingContainer;

import java.util.Arrays;

/**
 * @author hejianglong
 * @date 2018/9/6.
 */
public class AppServer {

    public static void init() {
        Class<?>[] classes = {
                AopContainer.class,
                BeanContainer.class,
                IocManager.class,
                MappingContainer.class
        };
        // JVM 装载需要扫描包下的所有的类
        LaunchClassloader.loadClasses();
        Arrays.asList(classes).forEach(aClass -> LaunchClassloader.loadClass(aClass.getName(), true));
    }

    public static void main(String[] args) {
        init();
    }
}
